#pragma once

#include "resource.h"

// Global Variables:
HINSTANCE	hInst;								// current instance
HANDLE		hTempFile;							// mutex file
HWND		hOpacityButton;
const TCHAR	*szTitle;							// The title bar text
const TCHAR	*szWindowClass;						// the main window class name
const TCHAR	*szErrorCaption;
const TCHAR	*szStartupTaskName;
bool		bCloseToTray, bNoUpdatesCheck;

// Forward declarations of functions included in this code module:
bool			 CheckForSupportedOS(HINSTANCE);
bool			 CheckForRunningInstances();
WORD			 RegisterMainWindow(HINSTANCE);
bool			 InitInstance(HINSTANCE, int);
bool			 InitControls(HWND);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT			 ProcessWMCommand(HWND, UINT, WPARAM, LPARAM);
void			 HandleButtonClick(bool);
bool			 GetRunAtStartup();
bool			 SetRunAtStartup(bool);
void __cdecl	 CheckForUpdates(void *);

typedef HANDLE(WINAPI *CREATEFILE2FN)(
	_In_ LPCWSTR lpFileName,
	_In_ DWORD dwDesiredAccess,
	_In_ DWORD dwShareMode,
	_In_ DWORD dwCreationDisposition,
	_In_opt_ LPCREATEFILE2_EXTENDED_PARAMETERS pCreateExParams);

CREATEFILE2FN	 CreateFile2Fn;

#define	IDB_BUTTON	 1000
#define	IDB_CHKRUNAT 1001
#define IDB_CHKTRAY	 1002
#define IDL_FOOTER	 1003
